<?php

namespace app\mall\ui\table;

use app\mall\enum\YesNoEnum;
use suframe\thinkAdmin\ui\table\TableInterface;

/**
 * 店员管理表格
 */
class MallStoreClerkTable extends TableInterface
{
    public function header()
    {
        return [
            'id'=> ['label' => 'ID', 'sort' => true, 'fixed' => 'left', 'width' => 80],
            'uid'=> ['label' => '会员UID'],
            'store_id'=> ['label' => '门店ID'],
            'store_name'=> ['label' => '门店'],
            'name'=> ['label' => '姓名'],
            'avatar'=> ['label' => '头像', 'type' => 'image'],
            'phone'=> ['label' => '电话'],
            'achievement'=> ['label' => '销售业绩'],
            'shopowner_text'=> ['label' => '是否店长', 'filter' => YesNoEnum::toZhArray(), 'field' => 'shopowner'],
        ];
    }

    public function filters()
    {
        return [
            'id' => ['label' => 'ID', 'type' => 'text'],
            'phone' => ['label' => '手机号', 'type' => 'text'],
        ];
    }
}